package com.zzuisa.sell.utils;

import com.zzuisa.sell.VO.ResultVO;

/**
 * @ClassName ResultVOUtil
 * @Description TODO
 * @Author SunAo
 * @Date 2018/8/5 上午2:00
 * @Version 1.0
 */
public class ResultVOUtil {
    public static ResultVO success(Object object) {
        ResultVO resultVO = new ResultVO();
        resultVO.setData(object);
        resultVO.setCode(0);
        resultVO.setMsg("成功");
        return resultVO;
    }

    public static ResultVO success() {
        return success(null);
    }

    public static ResultVO failed(Integer code, String msg) {
        ResultVO resultVO = new ResultVO();
        resultVO.setCode(code);
        resultVO.setMsg(msg);
        return resultVO;
    }

}
